package com.yu.scanner;

import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.context.annotation.ClassPathBeanDefinitionScanner;
import org.springframework.core.type.filter.AnnotationTypeFilter;

import java.lang.annotation.Annotation;

/**
 * @PackageName: scanner
 * @Description:
 * @Version: v1.0.0
 * @Author: yuweilin
 * @Date: 13:09
 * <p>
 * Modification History:
 * Date         Author          Version            Description
 * ------------------------------------------------------------
 * 2021/1/21      yuweilin         v1.0.0               新建
 */
public class CustomBeanScanner extends ClassPathBeanDefinitionScanner {
    public CustomBeanScanner(BeanDefinitionRegistry registry, Class<? extends Annotation> type) {
        super(registry);
        super.addIncludeFilter(new AnnotationTypeFilter(type));
    }

}
